import { ClipboardWrite, IpcEvent } from 'app/type'
import { ipcRenderer } from 'electron'

export function write(option: ClipboardWrite) {
    return ipcRenderer.invoke(IpcEvent.CLIPBOARD_WRITE, JSON.stringify(option))
}
export function clear() {
    return ipcRenderer.invoke(IpcEvent.CLIPBOARD_CLEAR)
}
export function readText() {
    return ipcRenderer.invoke(IpcEvent.CLIPBOARD_READ_TEXT)
}
export function readHtml() {
    return ipcRenderer.invoke(IpcEvent.CLIPBOARD_READ_HTML)
}
export function readImage() {
    return ipcRenderer.invoke(IpcEvent.CLIPBOARD_READ_IMAGE)
}
